package demo1;


import java.util.Arrays;

public class Test1 {
    public static void main(String[] args) {
        int [] array1 = {1,2,3,4,5} ;
        int [] array2 ;


        Student[] students = {new Student(18,"张三"),
                              new Student(12,"李四"),
                              new Student(11,"王五")};
        System.out.println(Arrays.toString(students));



    }


}
class  Student{
    int age ;
    String name ;
    public Student(int age, String name) {
        this.age = age;
        this.name = name;
    }

    @Override
    public String toString() {
        return "{" +
                "年龄：" + age +
                ", 名字：" + name + '\'' +
                '}';
    }
}